package com.szrt.java.day20170112.ch05;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

/**
 * 
 * 
 * abc.txt中有内容  "中深软通1612"
 * 读取 abc.txt的内容并且把这个内容输出到cbx.txt
 * 
 * "中深软通1612"输出到1个文件中 szrt.txt
 * @author zsrt
 *
 */
public class FileWriterTest {
	
	public static void main(String[] args) throws IOException {
		
		//1
		File file = new File("src/com/szrt/java/day20170112/ch05/szrt.txt");
		
		//2
		FileWriter fw = new FileWriter(file);
		
		//3
		String target= "中深软通1612";
		
		char[] b = target.toCharArray();
		
		//fw.write(b);
		fw.write(target);
		
		fw.close();
		
	}

}
